3.14.35 \(\int \frac {(b+2 c x) (d+e x)}{a+b x+c x^2} \, dx\)

Optimal. Leaf size=70 \[ -\frac {e \sqrt {b^2-4 a c} \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{c}+\frac {(2 c d-b e) \log \left (a+b x+c x^2\right )}{2 c}+2 e x \]

________________________________________________________________________________________

Rubi [A]  time = 0.09, antiderivative size = 70, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.208, Rules used = {773, 634, 618, 206, 628} \begin {gather*} -\frac {e \sqrt {b^2-4 a c} \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{c}+\frac {(2 c d-b e) \log \left (a+b x+c x^2\right )}{2 c}+2 e x \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((b + 2*c*x)*(d + e*x))/(a + b*x + c*x^2),x]

[Out]

2*e*x - (Sqrt[b^2 - 4*a*c]*e*ArcTanh[(b + 2*c*x)/Sqrt[b^2 - 4*a*c]])/c + ((2*c*d - b*e)*Log[a + b*x + c*x^2])/
(2*c)

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 773

Int[(((d_.) + (e_.)*(x_))*((f_) + (g_.)*(x_)))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(e*g*x)/
c, x] + Dist[1/c, Int[(c*d*f - a*e*g + (c*e*f + c*d*g - b*e*g)*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c,
 d, e, f, g}, x] && NeQ[b^2 - 4*a*c, 0]

Rubi steps

\begin {align*} \int \frac {(b+2 c x) (d+e x)}{a+b x+c x^2} \, dx &=2 e x+\frac {\int \frac {b c d-2 a c e+\left (2 c^2 d-b c e\right ) x}{a+b x+c x^2} \, dx}{c}\\ &=2 e x+\frac {\left (\left (b^2-4 a c\right ) e\right ) \int \frac {1}{a+b x+c x^2} \, dx}{2 c}+\frac {(2 c d-b e) \int \frac {b+2 c x}{a+b x+c x^2} \, dx}{2 c}\\ &=2 e x+\frac {(2 c d-b e) \log \left (a+b x+c x^2\right )}{2 c}-\frac {\left (\left (b^2-4 a c\right ) e\right ) \operatorname {Subst}\left (\int \frac {1}{b^2-4 a c-x^2} \, dx,x,b+2 c x\right )}{c}\\ &=2 e x-\frac {\sqrt {b^2-4 a c} e \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{c}+\frac {(2 c d-b e) \log \left (a+b x+c x^2\right )}{2 c}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.06, size = 72, normalized size = 1.03 \begin {gather*} \frac {-2 e \sqrt {4 a c-b^2} \tan ^{-1}\left (\frac {b+2 c x}{\sqrt {4 a c-b^2}}\right )+(2 c d-b e) \log (a+x (b+c x))+4 c e x}{2 c} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((b + 2*c*x)*(d + e*x))/(a + b*x + c*x^2),x]

[Out]

(4*c*e*x - 2*Sqrt[-b^2 + 4*a*c]*e*ArcTan[(b + 2*c*x)/Sqrt[-b^2 + 4*a*c]] + (2*c*d - b*e)*Log[a + x*(b + c*x)])
/(2*c)

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {(b+2 c x) (d+e x)}{a+b x+c x^2} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[((b + 2*c*x)*(d + e*x))/(a + b*x + c*x^2),x]

[Out]

IntegrateAlgebraic[((b + 2*c*x)*(d + e*x))/(a + b*x + c*x^2), x]

________________________________________________________________________________________

fricas [A]  time = 0.42, size = 176, normalized size = 2.51 \begin {gather*} \left [\frac {4 \, c e x + \sqrt {b^{2} - 4 \, a c} e \log \left (\frac {2 \, c^{2} x^{2} + 2 \, b c x + b^{2} - 2 \, a c - \sqrt {b^{2} - 4 \, a c} {\left (2 \, c x + b\right )}}{c x^{2} + b x + a}\right ) + {\left (2 \, c d - b e\right )} \log \left (c x^{2} + b x + a\right )}{2 \, c}, \frac {4 \, c e x - 2 \, \sqrt {-b^{2} + 4 \, a c} e \arctan \left (-\frac {\sqrt {-b^{2} + 4 \, a c} {\left (2 \, c x + b\right )}}{b^{2} - 4 \, a c}\right ) + {\left (2 \, c d - b e\right )} \log \left (c x^{2} + b x + a\right )}{2 \, c}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*c*x+b)*(e*x+d)/(c*x^2+b*x+a),x, algorithm="fricas")

[Out]

[1/2*(4*c*e*x + sqrt(b^2 - 4*a*c)*e*log((2*c^2*x^2 + 2*b*c*x + b^2 - 2*a*c - sqrt(b^2 - 4*a*c)*(2*c*x + b))/(c
*x^2 + b*x + a)) + (2*c*d - b*e)*log(c*x^2 + b*x + a))/c, 1/2*(4*c*e*x - 2*sqrt(-b^2 + 4*a*c)*e*arctan(-sqrt(-
b^2 + 4*a*c)*(2*c*x + b)/(b^2 - 4*a*c)) + (2*c*d - b*e)*log(c*x^2 + b*x + a))/c]

________________________________________________________________________________________

giac [A]  time = 0.16, size = 81, normalized size = 1.16 \begin {gather*} 2 \, x e + \frac {{\left (2 \, c d - b e\right )} \log \left (c x^{2} + b x + a\right )}{2 \, c} + \frac {{\left (b^{2} e - 4 \, a c e\right )} \arctan \left (\frac {2 \, c x + b}{\sqrt {-b^{2} + 4 \, a c}}\right )}{\sqrt {-b^{2} + 4 \, a c} c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*c*x+b)*(e*x+d)/(c*x^2+b*x+a),x, algorithm="giac")

[Out]

2*x*e + 1/2*(2*c*d - b*e)*log(c*x^2 + b*x + a)/c + (b^2*e - 4*a*c*e)*arctan((2*c*x + b)/sqrt(-b^2 + 4*a*c))/(s
qrt(-b^2 + 4*a*c)*c)

________________________________________________________________________________________

maple [A]  time = 0.06, size = 113, normalized size = 1.61 \begin {gather*} -\frac {4 a e \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}+\frac {b^{2} e \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}\, c}-\frac {b e \ln \left (c \,x^{2}+b x +a \right )}{2 c}+d \ln \left (c \,x^{2}+b x +a \right )+2 e x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2*c*x+b)*(e*x+d)/(c*x^2+b*x+a),x)

[Out]

2*e*x-1/2/c*ln(c*x^2+b*x+a)*b*e+d*ln(c*x^2+b*x+a)-4/(4*a*c-b^2)^(1/2)*arctan((2*c*x+b)/(4*a*c-b^2)^(1/2))*a*e+
1/(4*a*c-b^2)^(1/2)*arctan((2*c*x+b)/(4*a*c-b^2)^(1/2))*b^2/c*e

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*c*x+b)*(e*x+d)/(c*x^2+b*x+a),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*a*c-b^2>0)', see `assume?` f
or more details)Is 4*a*c-b^2 positive or negative?

________________________________________________________________________________________

mupad [B]  time = 0.32, size = 129, normalized size = 1.84 \begin {gather*} \ln \left (b\,\sqrt {b^2-4\,a\,c}-4\,a\,c+b^2+2\,c\,x\,\sqrt {b^2-4\,a\,c}\right )\,\left (d-\frac {\frac {b\,e}{2}+\frac {e\,\sqrt {b^2-4\,a\,c}}{2}}{c}\right )+2\,e\,x+\ln \left (4\,a\,c+b\,\sqrt {b^2-4\,a\,c}-b^2+2\,c\,x\,\sqrt {b^2-4\,a\,c}\right )\,\left (d-\frac {\frac {b\,e}{2}-\frac {e\,\sqrt {b^2-4\,a\,c}}{2}}{c}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((b + 2*c*x)*(d + e*x))/(a + b*x + c*x^2),x)

[Out]

log(b*(b^2 - 4*a*c)^(1/2) - 4*a*c + b^2 + 2*c*x*(b^2 - 4*a*c)^(1/2))*(d - ((b*e)/2 + (e*(b^2 - 4*a*c)^(1/2))/2
)/c) + 2*e*x + log(4*a*c + b*(b^2 - 4*a*c)^(1/2) - b^2 + 2*c*x*(b^2 - 4*a*c)^(1/2))*(d - ((b*e)/2 - (e*(b^2 -
4*a*c)^(1/2))/2)/c)

________________________________________________________________________________________

sympy [B]  time = 0.71, size = 134, normalized size = 1.91 \begin {gather*} 2 e x + \left (- \frac {e \sqrt {- 4 a c + b^{2}}}{2 c} - \frac {b e - 2 c d}{2 c}\right ) \log {\left (x + \frac {d + \frac {e \sqrt {- 4 a c + b^{2}}}{2 c} + \frac {b e - 2 c d}{2 c}}{e} \right )} + \left (\frac {e \sqrt {- 4 a c + b^{2}}}{2 c} - \frac {b e - 2 c d}{2 c}\right ) \log {\left (x + \frac {d - \frac {e \sqrt {- 4 a c + b^{2}}}{2 c} + \frac {b e - 2 c d}{2 c}}{e} \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*c*x+b)*(e*x+d)/(c*x**2+b*x+a),x)

[Out]

2*e*x + (-e*sqrt(-4*a*c + b**2)/(2*c) - (b*e - 2*c*d)/(2*c))*log(x + (d + e*sqrt(-4*a*c + b**2)/(2*c) + (b*e -
 2*c*d)/(2*c))/e) + (e*sqrt(-4*a*c + b**2)/(2*c) - (b*e - 2*c*d)/(2*c))*log(x + (d - e*sqrt(-4*a*c + b**2)/(2*
c) + (b*e - 2*c*d)/(2*c))/e)

________________________________________________________________________________________